package joonany.basic.j03;
import java.util.Scanner;


public class GuGuDan2 {

	public static void main(String[] args) {
		//문자값을 받았을때는 어떻게 처리하지?
		Scanner sc = new Scanner(System.in);
		
		int x, dan;
		x = 1;
		
		System.out.println("몇단의 구구단을 설정하시겠습니까?(1 ~ 9 중 입력) : ");
		dan = sc.nextInt();
		
		sc.close();
		
		if(1 <= dan && dan <= 9){
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //1
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //2
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //3
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //4
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //5
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //6
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //7
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //8
			System.out.println(dan + " x " + x + " = " + (dan * x)); ++x; //9
		}else {System.out.println("잘못 입력하셨습니다!! 입력하신 값은 " + dan);}

	}

}
